import dayjs, { Dayjs } from 'dayjs';
import { type BookRecord } from './book-record';
import { type BorrowerRecord } from './borrower-record';

export enum BorrowTransactionStatus {
  BORROWED = 'BORROWED',
  RETURNED = 'RETURNED'
}

export interface TransactionRecord {
  id?: number;
  borrower: BorrowerRecord;
  book: BookRecord;
  borrowDate: Dayjs;
  status: BorrowTransactionStatus;
  returnDate: Dayjs | null;
}